package com.ad.nbi.CSIRPSystem;
import org.omg.CORBA.ORB;
import org.omg.CORBA.ShortHolder;
import org.omg.CORBA.SystemException;
import org.omg.PortableServer.POA;

import CSIRPConstDefs.Result;
import CSIRPSystem.ConflictingHeartbeatPeriod;
import CSIRPSystem.GetCSIRPNotificationProfile;
import CSIRPSystem.GetCSIRPOperationsProfile;
import CSIRPSystem.GetCSIRPVersions;
import CSIRPSystem.GetHeartbeatPeriod;
import CSIRPSystem.InvalidHeartbeatPeriod;
import CSIRPSystem.InvalidManagerIdentifier;
import CSIRPSystem.SetHeartbeatPeriod;
import CSIRPSystem.TriggerHeartbeat;
import ManagedGenericIRPConstDefs.Method;
import ManagedGenericIRPSystem.InvalidParameter;
import ManagedGenericIRPSystem.OperationNotSupported;
import ManagedGenericIRPSystem.ValueNotSupported;
/**
 * This class is the implemetation object for your IDL interface.
 *
 * Let the Eclipse complete operations code by choosing 'Add unimplemented methods'.
 */
public class CSIRPServerImpl extends CSIRPSystem.CSIRPPOA {
	POA currentPoa = null;
	private ORB orb;

	/**
	 * Constructor for CSIRPServerImpl
	 * @param currPoa
	 */
	public CSIRPServerImpl(POA currentPoa)	{
		this.currentPoa = currentPoa;
	}

	/**
	 * create method hides object creation
	 * 
	 * @param currPoa
	 * @return CSIRPServerImpl
	 * @throws SystemException
	 */
	public static CSIRPServerImpl _create(POA currentPoa) throws SystemException {
		return new CSIRPServerImpl(currentPoa);
	}

	/**
	 * _default_POA()
	 * 
	 * Overrides the inherited _default_POA
	 * The inherited _default_POA returns the root POA, by overriding it the correct POA is returned.
	 */
	public POA _default_POA()	{
		return currentPoa;
	}

	@Override
	public Result get_heartbeat_period(ShortHolder heartbeat_period)
			throws GetHeartbeatPeriod {
		// TODO Auto-generated method stub
		heartbeat_period.value = 10;
		return Result.SUCCESS;
	}

	@Override
	public Result set_heartbeat_period(short heartbeat_period)
			throws InvalidHeartbeatPeriod, ConflictingHeartbeatPeriod,
			OperationNotSupported, ValueNotSupported, SetHeartbeatPeriod {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Result trigger_heartbeat(String manager_identifier)
			throws InvalidManagerIdentifier, TriggerHeartbeat {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String[] get_cs_irp_versions() throws GetCSIRPVersions {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Method[] get_cs_irp_operations_profile(String irp_version)
			throws InvalidParameter, OperationNotSupported,
			GetCSIRPOperationsProfile {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Method[] get_cs_irp_notification_profile(String irp_version)
			throws InvalidParameter, OperationNotSupported,
			GetCSIRPNotificationProfile {
		// TODO Auto-generated method stub
		return null;
	}

	public void setOrb(ORB orb) {
		this.orb = orb;
		
	}

}
